<template>
	<view class="article-item-wrapper" @click="toDetail">
		<view class="content-desc">
			<text>{{ record.title  }}</text>
		</view>
		<view class="author-wrapper">
			<image src="/static/avatar.png" class="user-avatar" mode="aspectFill"></image>
			<text class="user-name">{{ record.author }}</text>
			<text class="action-text">{{ record.collect_num }}收藏</text>
			<text class="action-text">{{ record.like_num }}赞</text>
		</view>
	</view>
</template>

<script>
	import props from './props.js'
	export default {
		mounted() {
			console.log(this.record, 'record-text');
		},
		methods: {
			toDetail() {
				let url = '/pages-bundle/article-detail/index?id=' + this.record.id
				if (this.record.__bindEvent) {
					url += '&event=1'
				}
				uni.navigateTo({ url })
			},
		},
		props,
	}
</script>